import urllib
import re
from lxml import html
html = 'http://news.baidu.com/'
local = 'C:/Users/cm/Desktop/new 1.html'
def getImg(html):
  reg = r'src="(.*?\.jpg)" '
  imgre_pattern = re.compile(reg)
  imglist = re.findall(imgre_pattern,html)
  x = 0
  for imgurl in imglist:
    urllib.urlretrieve(imgurl, local, reporthook=None, data=None)
    x += 1
	


